//
//  SelfSizeTool.m
//  UI10_CellCelfSize自适应高度
//
//  Created by 402030900@qq.com on 16/7/27.
//  Copyright © 2016年 402030900@qq.com. All rights reserved.
//

#import "SelfSizeTool.h"

@implementation SelfSizeTool
+(CGFloat)selfSizeHeightWithString:(NSString *)string width:(CGFloat)width font:(UIFont *)font{
    CGRect newRect = [string boundingRectWithSize:CGSizeMake(width, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:font} context:nil];
    return newRect.size.height;

}
@end
